package GenericTest;

public class GenericClassExtends {

}

class Father<T1, T2> {
}

// 等价于class Son1 extends Father<Object, Object> {}
class Son1 extends Father {
}

// 等价于class Son2 extends Father<String, Integer> {}
class Son2 extends Father<String, Integer> {
}

// 完全保留父类的泛型
class Son3<T1, T2> extends Father<T1, T2> {
}

// 部分保留父类的泛型
class Son4<T1> extends Father<T1, Integer> {
}

// 定义子类特有的泛型，等价于class Son5<E1, E2> extends Father<Object, Object> {}
class Son<E1, E2> extends Father {
}

// 定义子类特有的泛型，等价于class Son6<E1, E2> extends Father<String, Integer> {}
class Son6<E1, E2> extends Father<String, Integer> {
}

// 定义子类特有的泛型，部分保留父类的泛型
class Son7<T1, E1> extends Father<T1, Integer> {
}
